#define MAP_W   15
#define MAP_H   15

#define ACTION_UP 0
#define ACTION_LEFT 1
#define ACTION_DOWN 2
#define ACTION_RIGHT 3

#include <stdio.h>
#include <string.h>
#include <ctype.h>

#include <iostream>
#include <fstream>
#include <opencv2/core/core.hpp>

#include <vector>
#include <sys/time.h>

using namespace cv;
using namespace std;

#include <iostream>
#include <string>
#include <random>


bool Rejector(double P)
{

    double t = (rand()/(double(RAND_MAX)));

    if(t<=P)return true;
    else return false;
}

void init_random_seed()
{
    timeval time;
    gettimeofday(&time,0);
    srand(time.tv_usec);
}